package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.SCustInfoTempDao;
import com.xyz.domain.table.SCustInfoTemp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SCustInfoTempLogic {

    @Autowired
    private SCustInfoTempDao sCustInfoTempDao;

    public SCustInfoTemp add(SCustInfoTemp sCustInfoTemp){
        return sCustInfoTempDao.insert(sCustInfoTemp);
    }

    public Integer update(SCustInfoTemp sCustInfoTemp){
        return sCustInfoTempDao.update(sCustInfoTemp);
    }

    public List<SCustInfoTemp> list(SCustInfoTemp sCustInfoTemp, String orderBy){
        return sCustInfoTempDao.selectList(sCustInfoTemp, orderBy);
    }

    public Integer delete(Integer key){
        return sCustInfoTempDao.delete(key);
    }

    public PageResponseModel<SCustInfoTemp> pageInfo(SCustInfoTemp sCustInfoTemp, String orderBy, Integer pageNo, Integer pageSize){
        return sCustInfoTempDao.selectByPageNo(sCustInfoTemp, orderBy, pageNo, pageSize);
    }

}